package me.zk.practice1.s;

/**
 * @Author: zhang kai
 * @Date: 2023/05/06
 * @Description:
 */
public class S12 {

    public static void main(String[] args) {
        System.out.println(Math.sqrt(10));
    }

    public static boolean judgeSquareSum(int c) {
        int left = 0;
        long right = (long)Math.sqrt(c);
        while (left <= right) {
            long a = left * left + right *right;
            if (a == c) {
                return true;
            } else if (a > c) {
                right--;
            } else {
                left++;
            }
        }
        return false;
    }

}

